package main

//利用指数表、对数表快速计算
//a=3^loga b=3&logb
//a*b=3^(loga+logb)
func GFmulTab_8(exp []uint8, log []uint8, a uint8, b uint8) (result uint8) {
	if a == 0 || b == 0 {
		return 0
	}
	m := log[a]
	n := log[b]
	if int(m)+int(n) > 255 {
		return exp[m+n-255]
	}
	return exp[m+n]
}
